import request from '@/utils/request'

export const GetCategoryBrandPage = (pageNum, pageSize, searchObj) => {
  return request({
    url: `/admin/product/categoryBrand/page/${pageNum}/${pageSize}`,
    method: 'get',
    params: searchObj,
  })
}

export const DeleteCategoryBrandById = id => {
  return request({
    url: `/admin/product/categoryBrand/deleteById/${id}`,
    method: 'delete',
  })
}

export const GetCategoryBrandById = id => {
  return request({
    url: `/admin/product/categoryBrand/getById/${id}`,
    method: 'get',
  })
}

export const UpdateCategoryBrandById = categoryBrand => {
  return request({
    url: `/admin/product/categoryBrand/updateById`,
    method: 'put',
    data: categoryBrand,
  })
}

export const SaveCategoryBrand = categoryBrand => {
  return request({
    url: `/admin/product/categoryBrand/save`,
    method: 'post',
    data: categoryBrand,
  })
}
export const FindBrandByCategoryId = C3id => {
  return request({
    url: `/admin/product/categoryBrand/findBrandByCategoryId/${C3id}`,
    method: 'get',
  })
}
